[Unit]
Description=ElasticSearch Service
After=network.target

[Service]
Type=simple
User=appadmin
Group=users
Environment=JAVA_HOME={{ java_home }}
EnvironmentFile=-{{ install_path }}/elasticsearch/config
ExecStart={{ install_path }}/elasticsearch/bin/elasticsearch
PIDFile={{ install_path }}/elasticsearch/run/elasticsearch.pid
LimitNOFILE=65536
Restart=on-failure

[Install]
WantedBy=default.target